
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>增强版登录</title>
    <style>
        body {
            font-family: 'Arial', sans-serif;
            background-image: url('images/1.jpg'); /* 使用你选择的背景图片链接 */
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            margin: 0;
            padding: 20px;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            color: #fff; /* 设置文字颜色为白色，增强可读性 */
        }

        .login-container {
            background-color: rgba(255, 255, 255, 0.9); /* 半透明的背景色 */
            padding: 30px;
            border-radius: 8px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
            width: 100%;
            max-width: 400px;
        }

        h2 {
            color: #333;
            text-align: center;
            margin-bottom: 25px;
            font-size: 24px;
        }

        .form-group {
            margin-bottom: 20px;
        }

        label {
            display: block;
            margin-bottom: 8px;
            font-weight: bold;
            color: #555;
        }

        input[type="text"],
        input[type="password"] {
            width: 100%;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 4px;
            box-sizing: border-box;
            font-size: 16px;
        }

        .radio-group {
            margin: 15px 0;
        }

        .radio-option {
            display: inline-block;
            margin-right: 20px;
        }

        .radio-option input {
            margin-right: 5px;
        }

        .button-group {
            display: flex;
            justify-content: space-between;
            margin-top: 25px;
        }

        input[type="submit"],
        button {
            padding: 10px 20px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 16px;
            transition: background-color 0.3s;
        }

        input[type="submit"] {
            background-color: #4CAF50;
            color: white;
        }

        input[type="submit"]:hover {
            background-color: #45a049;
        }

        button {
            background-color: #2196F3;
            color: white;
        }

        button:hover {
            background-color: #0b7dda;
        }

        a {
            text-decoration: none; /* 去除按钮下划线 */
        }

    </style>
</head>
<body>
<div class="login-container">
    <h2>用户登录</h2>
    <form action="LoginServlet" method="post">
        <div class="form-group">
            <label for="username">用户名：</label>
            <input type="text" id="username" name="username" required>
        </div>

        <div class="form-group">
            <label for="password">密码：</label>
            <input type="password" id="password" name="password" required>
        </div>

        <div class="radio-group">
            <label>角色：</label>
            <div class="radio-option">
                <input type="radio" id="teacher" name="role" value="教师" required>
                <label for="teacher">教师</label>
            </div>
            <div class="radio-option">
                <input type="radio" id="student" name="role" value="学生" required>
                <label for="student">学生</label>
            </div>
        </div>

        <div class="radio-group">
            <label>性别：</label>
            <div class="radio-option">
                <input type="radio" id="male" name="gender" value="男" required>
                <label for="male">男</label>
            </div>
            <div class="radio-option">
                <input type="radio" id="female" name="gender" value="女" required>
                <label for="female">女</label>
            </div>
        </div>

        <div class="button-group">
            <input type="submit" value="登录">
            <a href="register.jsp"><button type="button">注册</button></a>
        </div>
    </form>
</div>
</body>
</html>
